package com.copm.ifm.common.mq.rabbit;

/**
 * 消息常量类（发送失败的次数和超时时间）
 *
 * @author tp
 */
public class RabbitConstants {

    /**
     * 发送中
     */
    public static final String ORDER_SENDING = "0";

    /**
     * 成功
     */
    public static final String ORDER_SEND_SUCCESS = "1";

    /**
     * 失败
     */
    public static final String ORDER_SEND_FAILURE = "2";

    /**
     * 失败
     */
    public static final Integer ORDER_SEND_MAX = 3;

    /**
     * 分钟超时单位：min
     */
    public static final int ORDER_TIMEOUT = 1;

    /**
     * 消息队列
     * 不同任务定义的消息队列不同，所有定义各自的队列名
     */
    public static class Queue {
        /**
         * 异常处理
         */
        public static final String EXCEPTION_HANDLER = "exception_handler";
        public static final String IFM_HANDLER = "ifm_handler";
        public static final String IFM_DEADLETTER_QUEUE = "ifm_dead_handler";
    }

    public static class Exchange {
        /**
         * 异常处理
         */
        public static final String EXCEPTION_HANDLER = "exception_handler";
        public static final String IFM_HANDLER_EXCHANGE = "ifm_handler_exchange";
        public static final String IFM_DEADLETTER_EXCHANGE = "ifm_dead_exchange";
    }

    public static class Key {
        /**
         * 异常处理
         */
        public static final String EXCEPTION_HANDLER = "exception_handler";
        public static final String IFM_HANDLER = "ifm_handler";
        public static final String IFM_DEADLETTER_KEY = "ifm_dead_key";
    }
}
